package com.wyx.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private RestTemplate restTemplate;

    @GetMapping("/select")
    private String select(){
        String url="http://cloud-product/product/select";
        String object = restTemplate.getForObject(url, String.class);
        return "我是用户的查询"+object ;
    }
}
